package com.lzhsite.technology.designPattern.decorate.PrizeDemo;

import java.util.Date;

public class MonthPrizeDecorator extends Decorator
{
    protected MonthPrizeDecorator(Component component)
    {
        super(component);
    }

    @Override
    public double calculatePrize(String user, Date begin, Date end)
    {
        double money = super.calculatePrize(user, begin, end);
        double prize = TempDB.mapMonthlySaleMoney.get(user) * 0.03;
        System.out.println(user + " 当月业务奖金" + prize);
        return money + prize;
    }
}
